package controller;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import model.OrderViewModel;
import model.ProductModel;
import dao.Orders;
import dao.Products;

public class ManageOrders extends HttpServlet {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	public void doGet(HttpServletRequest request, HttpServletResponse response)
	throws ServletException, IOException{
		String status = request.getParameter("stt");
		PrintWriter out = response.getWriter();
		//		List<OrderViewModel> orders = new ArrayList<OrderViewModel>();
//		Orders productDTO = new Orders();
//		orders = productDTO.getOrders(0);
		if(status == null){
			status = "-1";
		}
		request.setAttribute("status", status);
		HttpSession session = request.getSession();
		session.setAttribute("status", status);

		request.getRequestDispatcher("js/orders.jsp").forward(request, response);
	}
}
